package com.example.lenovo.liweixin1601v20180702.m.model;

import com.example.lenovo.liweixin1601v20180702.m.http.HttpUtils;

import java.util.Map;

/**
 * Created by lenovo on 2018/7/2.
 */

public class Model implements Imodel {
    @Override
    public void getNewData(String url, Map<String, String> map, final GetNewListener getNewListener) {
        HttpUtils httpUtils = HttpUtils.getHttpUtils();
        httpUtils.OkGet(url);
        httpUtils.setGetNewListener(new GetNewListener() {
            @Override
            public void getSuccess(String json) {
                getNewListener.getSuccess(json);
            }

            @Override
            public void getError(String error) {
                getNewListener.getError(error);
            }
        });
    }
}
